package com.ruoyi.system.service.impl;


import com.ruoyi.system.domain.Address;
import com.ruoyi.system.mapper.AddressMapper;
import com.ruoyi.system.service.AddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AddressServiceImpl implements AddressService {
    @Autowired
    private AddressMapper addressMapper;

    @Override
    public int insertAddress(Address address) {
        return addressMapper.insertAddress(address);
    }

    @Override
    public int deleteAddressById(Long id) {
        return addressMapper.deleteAddressById(id);
    }

    @Override
    public List<Address> getAddressesByUserId(Long id) {
        return addressMapper.getAddressesByUserId(id);
    }
}